package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.CheckGroup;
import com.itheima.pojo.Order;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface OrderDao {

    public void add(Order order);

    public List<Order> findByCondition(Order order);

    public Map findById4Detail(Integer id);

    public Map findById4Details(Integer id);

    public Integer findOrderCountByDate(String date);

    public Integer findOrderCountAfterDate(String date);

    public Integer findVisitsCountByDate(String date);

    public Integer findVisitsCountAfterDate(String date);

    public List<Map> findHotSetmeal();

    List<Order> findOrderDates(String startDate, String endDate, String phoneNumber);

    public Page<Order> selectByCondition(String queryString);


    public List<Order> findAllsetmealByMemberId(Integer id);

    public Order checksame(@Param("memberId") Integer id, @Param("orderDate")Date orderDate, @Param("setmealId")Integer setmealId);

    public Page<Order> selectByCondition(String startDate, String endDate, String orderType, String orderStatus, String queryString);

    public Map findAllById(Integer id);


    public void edit(Order order);

    void deleteById(Integer id);

    void changeStatus(Order order);

    List<Map<String, Object>> findSexCount();

    List<Map<String, Object>> findAgeCount();
}
